package com.kede.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kede.validationgroup.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 用户管理
 * @TableName sy_users
 */
@TableName(value ="sy_users")
@Data
public class UsersDomain implements Serializable {
    /**
     * 主键
     */
    @NotNull(groups = UpdateGroup.class,message = "不可为空")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 积分数量
     */
    @TableField(value = "integral")
    private BigDecimal integral;

    /**
     * 1会员0非会员
     */
    @TableField(value = "is_vip")
    private Integer isVip;

    /**
     * 1用户2骑手3门店4区代理5市代理
     */
    @TableField(value = "user_type")
    private Integer userType;

    /**
     * 用户昵称
     */
    @TableField(value = "users_name")
    private String usersName;

    /**
     * 用户头像
     */
    @TableField(value = "users_image")
    private String usersImage;

    /**
     * 用户性别
     */
    @TableField(value = "users_sex")
    private Integer usersSex;

    /**
     * 用户电话
     */
    @TableField(value = "users_phone")
    private String usersPhone;

    /**
     * 所属代理
     */
    @TableField(value = "admin_id")
    private Integer adminId;

    /**
     *  唯一表示凭证
     */
    @TableField(value = "open_id")
    private String openId;

    /**
     * 用户总收入
     */
    @TableField(value = "count_money")
    private BigDecimal countMoney;

    /**
     * 用户已提现金额
     */
    @TableField(value = "withdraw_money")
    private BigDecimal withdrawMoney;

    /**
     * 用户当前余额
     */
    @TableField(value = "residue_money")
    private BigDecimal residueMoney;

    /**
     * token
     */
    @TableField(value = "token")
    private String token;

    /**
     * token过期时间
     */
    @TableField(value = "expiration_time")
    private Integer expirationTime;

    /**
     * 更新时间
     */
    @TableField(value = "createtime")
    private Integer createtime;

    /**
     * 用户状态:1=正常 ,2=拉黑
     */
    @TableField(value = "status")
    private Object status;

    /**
     * 用户密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 出生日期
     */
    @TableField(value = "birthday")
    private String birthday;

    /**
     * 
     */
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 
     */
    @TableField(value = "openid")
    private String openid;

    /**
     * 小程序openid
     */
    @TableField(value = "xcx_openid")
    private String xcxOpenid;

    /**
     * app骑手端openid
     */
    @TableField(value = "app_rider_openid")
    private String appRiderOpenid;

    /**
     * 
     */
    @TableField(value = "xcx_rider_openid")
    private String xcxRiderOpenid;

    /**
     * 门店端小程序openid
     */
    @TableField(value = "xcx_store_openid")
    private String xcxStoreOpenid;

    /**
     * 小程序区代理
     */
    @TableField(value = "xcx_qu_openid")
    private String xcxQuOpenid;

    /**
     * 小程序市代理openid
     */
    @TableField(value = "xcx_shi_openid")
    private String xcxShiOpenid;

    /**
     * 
     */
    @TableField(value = "thumb")
    private String thumb;

    /**
     * 是否是新用户
     */
    @TableField(value = "is_new")
    private Integer isNew;

    /**
     * 
     */
    @TableField(value = "lastid")
    private Integer lastid;

    /**
     * 余额
     */
    @TableField(value = "user_money")
    private BigDecimal userMoney;

    /**
     * 
     */
    @TableField(value = "wx_qrcode")
    private String wxQrcode;

    /**
     * 
     */
    @TableField(value = "wx_name")
    private String wxName;

    /**
     * 
     */
    @TableField(value = "alipay_qrcode")
    private String alipayQrcode;

    /**
     * 
     */
    @TableField(value = "alipay_name")
    private String alipayName;

    /**
     * 本月已兑换数量
     */
    @TableField(value = "yet_num")
    private Integer yetNum;

    /**
     * 会员到期时间
     */
    @TableField(value = "expire_time")
    private Integer expireTime;

    /**
     * 支付密码
     */
    @TableField(value = "pay_pwd")
    private String payPwd;

    /**
     * 区
     */
    @TableField(value = "address")
    private Integer address;

    /**
     * province
     */
    @TableField(value = "province_code")
    private Integer provinceCode;

    /**
     * city
     */
    @TableField(value = "city_code")
    private Integer cityCode;

    /**
     * 详细地址
     */
    @TableField(value = "address_detail")
    private String addressDetail;

    /**
     * 现金置换数
     */
    @TableField(value = "zhi_money_num")
    private Integer zhiMoneyNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


    public String getOpenid() {
        return openid;
    }

    public void  setOpenid(String openid) {
        this.openid = openid;
    }


}